package com.skp.shaphan.internalStorage;

public class Version {
	private int minor = 0;
	private int major = 0;
	public Version() {
		
	}
	public Version(int major, int minor) {
		this.major = major;
		this.minor = minor;
	}
	public int getMinor() {
		return minor;
	}
	public void setMinor(int minor) {
		this.minor = minor;
	}
	public int getMajor() {
		return major;
	}
	public void setMajor(int major) {
		this.major = major;
	}
	public int compare(Version otherVersion) {
		int compare = otherVersion.getMajor() - this.getMajor();
		if(compare == 0) {
			compare = otherVersion.getMinor() - this.getMinor();
		}
		return compare;
	}
	@Override
	public String toString() {
		return major + "." + minor;
	}
}
